\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage{listings}
\usepackage[justification=centering]{caption}
\usepackage{subfigure}  
\usepackage{multirow}
\usepackage{balance}
\usepackage{gensymb}
\lstset{language=Matlab}
\lstset{breaklines}
\lstset{extendedchars=false}

\usepackage{amsmath,amsfonts,amsthm,amssymb}
\theoremstyle{definition}
\newtheorem{thm}{Theorem}
\newtheorem{exmp}{Example}
\newtheorem{defn}{Definition}
\newtheorem{lema}{Lemma}
\newtheorem{prop}{Proposition}
\newtheorem{coro}{Corollary}

\newcommand{\GreekAlpha}[1]{\uppercase\expandafter{\romannumeral#1}}
\newcommand{\Greekalpha}[1]{\lowercase\expandafter{\romannumeral#1}}
\renewcommand{\baselinestretch}{1.25}

%------------setlength----------------%
\setlength{\textwidth}{162mm}
%\setlength{\textheight}{190mm}
\setlength{\textheight}{231mm}
\setlength{\headheight}{-0.1cm}
\setlength{\topmargin}{-0.1cm}
\setlength{\oddsidemargin}{-0cm}
\setlength{\evensidemargin}{-0cm}

\setlength\columnsep{12pt}
\setlength\columnseprule{0.4pt}

\setlength{\parskip}{1mm}
\setlength{\unitlength}{1mm}
\setlength{\parindent}{2em}

\title{Numerical Analysis Homework \#7}

\author{Li Zhiqi\quad 3180103041 , }

\begin{document}
\maketitle
\section{Exercise 7.13}
By definition 7.12,
\begin{align*}
\|\mathbf{g}\|_{\infty}&=\max _{1 \leq i \leq N}\left|g_{i}\right|=\max \{O(h),O(h^2)\}=O(h),\\
\|\mathbf{g}\|_{1}&=h \sum_{i=1}^{N}\left|g_{i}\right|=h(O(h)+(N-2)O(h^2))=O(h^2),
\end{align*}
where the last step comes from $hN = O(1)$. Similarily,
\begin{align*}
\|\mathbf{g}\|_{2}=\left(h \sum_{i=1}^{N}\left|g_{i}\right|^{2}\right)^{\frac{1}{2}}=[h(O(h^2)+(N-2)O(h^4))]^{\frac{1}{2}}=(O(h^3)+O(h^4))^{\frac{1}{2}}=O(h^{\frac{3}{2}}).
\end{align*}
\section{Exercise 7.34}
For
$$
A_{E}=\frac{1}{h^{2}}\left[\begin{array}{ccccccc}
-h & h & & & & & \\
1 & -2 & 1 & & & & \\
& 1 & -2 & 1 & & & \\
& & \ddots & \ddots & \ddots & & \\
& & & 1 & -2 & 1 & \\
& & & & 1 & -2 & 1 \\
& & & & & 0 & h^{2}
\end{array}\right]_{(m+2)\times (m+2)},
$$
\onecolumn
\noindent Consider the equation $A_Eb_1=e_1$. Omit the coefficient
$\frac{1}{h^2}$, then
$$
\left[\begin{array}{ccccccc|c}
-h & h & & & & & & 1\\
1 & -2 & 1 & & & & & 0\\
& 1 & -2 & 1 & & & & 0\\
& & \ddots & \ddots & \ddots & & & \vdots\\
& & & 1 & -2 & 1 & & 0\\
& & & & 1 & -2 & 1 & 0\\
& & & & & 0 & h^{2}& 0
\end{array}\right]\Longrightarrow
\left[\begin{array}{ccccccc|c}
-h & h & & & & & & 1\\
0 & -1 & 1 & & & & & \frac{1}{h}\\
& 0 & -1 & 1 & & & & \frac{1}{h}\\
& & \ddots & \ddots & \ddots & & & \vdots\\
& & & 0 & -1 & 1 & & \frac{1}{h}\\
& & & & 0 & -1 & 1 & \frac{1}{h}\\
& & & & & 0 & h^{2}& 0
\end{array}\right]\Longrightarrow
$$

$$
\left[\begin{array}{ccccccc|c}
-h & 0 & & & & & & m+1\\
0 & -1 & 0 & & & & & \frac{m}{h}\\
& 0 & -1 & 0 & & & & \frac{m-1}{h}\\
& & \ddots & \ddots & \ddots & & & \vdots\\
& & & 0 & -1 & 0 & & \frac{2}{h}\\
& & & & 0 & -1 & 0 & \frac{1}{h}\\
& & & & & 0 & h^{2}& 0
\end{array}\right]
$$
multiply the coefficient $\frac{1}{h^2}$, we get
$$b_1=
\left[\begin{array}{c}
-(m+1)h \\
-mh \\
-(m-1)h\\
\vdots  \\
-2h\\
-h \\
0
\end{array}\right].
$$
Similarily, we can obtain $b_2,b_2,\cdots,b_{m+2}$. Then
$$
B_{E}=A_{E}^{-1}=\left[\begin{array}{ccccccc}
-(m+1)h & -mh^2 & -(m-1)h^2&\dots  &-2h^2 &-h^2 & 1\\
-mh & -mh^2 & -(m-1)h^2 &\dots  &-2h^2 &-h^2 & 1\\
-(m-1)h& -(m-1)h^2 & -(m-1)h^2 & \dots  &-2h^2 &-h^2 & 1\\
\vdots &\vdots & \vdots & \ddots & \vdots &\vdots &\vdots \\
-2h& -2h^2&-2h^2 &\dots & -2h^2 & -h^2 & 1\\
-h& -h^2&-h^2 & \dots& -h^2 & -h^2 & 1 \\
0&0 &0 &\dots &0 & 0 & 1
\end{array}\right],
$$
The first column of $B_E$ is
$$
\left[\begin{array}{c}
-(m+1)h \\
-mh \\
-(m-1)h\\
\vdots  \\
-2h\\
-h \\
0
\end{array}\right],
$$
which is $O(1)$.
\section{Exercise 7.39}
By definition 7.14,
\begin{equation}
  \small
\begin{aligned}
  &\tau_{i,j} = -D^2(u) - (-\triangle u) \\
             &=u_{xx}(ih,jh)+u_{yy}(ih,jh)-\frac{U_{i-1,j}-2U_{ij}+U_{i+1,j}}{h^2}-\frac{U_{i,j-1}-2U_{ij}+U_{i,j+1}}{h^2}\\
             &=[u_{xx}\!+\!u_{yy}\!-\!\frac{(u\!-\!hu_x\!+\!\frac{h^2}{2}u_{xx}\!-\!\frac{h^3}{6}u_{xxx}\!+\!\frac{h^4}{24}u_{xxxx}\!+\!O(h^5))\!-\!2u\!+\!(u\!+\!hu_x\!+\!\frac{h^2}{2}u_{xx}\!+\!\frac{h^3}{6}u_{xxx}\!+\!\frac{h^4}{24}u_{xxxx}\!+\!O(h^5))}{h^2}\\
             &\quad
             -\frac{(u\!-\!hu_y\!+\!\frac{h^2}{2}u_{yy}\!-\!\frac{h^3}{6}u_{yyy}\!+\!\frac{h^4}{24}u_{yyyy}\!+\!O(h^5))\!-\!2u\!+\!(u\!+\!hu_y\!+\!\frac{h^2}{2}u_{yy}\!+\!\frac{h^3}{6}u_{yyy}\!+\!\frac{h^4}{24}u_{yyyy}\!+\!O(h^5))}{h^2}]\bigg|_{(x_i,y_j)}\\
             &=-\frac{h^2}{12}(u_{xxxx}+u_{yyyy})\bigg|_{(x_i,y_j)} + O(h^3).\nonumber
\end{aligned}
\end{equation}
\section{Exercise 7.57}
What we need to show is that the LTE at an irregular interior point is
$O(h)$. Notice
\begin{align*}
  &\frac{(1+\theta)U_P-U_A-\theta U_W
  )}{\frac{1}{2}\theta(1+\theta)h^2}\\
  &=\frac{(1+\theta)u-(u+\theta
    hu_x+\frac{\theta^2h^2}{2}u_{xx}+\frac{\theta^3h^3}{6}u_{xxx}+O(h^4))-\theta(u-
    hu_x+\frac{h^2}{2}u_{xx}-\frac{h^3}{6}u_{xxx}+O(h^4)))}{\frac{1}{2}\theta(1+\theta)h^2}\bigg|_P\\
  &=(-u_{xx}-\frac{1-\theta}{3}hu_{xxx}\bigg)|_P + O(h^2).
\end{align*}
Hence
\begin{align*}
  \tau_P= L_hU_P - (-\triangle u(P)) &=
  (u_{xx}+u_{yy}-u_{xx}-\frac{1-\theta}{3}hu_{xxx}-u_{yy}-\frac{1-\alpha}{3}hu_{yyy})\bigg|_P
  + O(h^2)\\
  &=(-\frac{1-\theta}{3}hu_{xxx}-\frac{1-\alpha}{3}hu_{yyy})\bigg|_P
  + O(h^2),
\end{align*}
which shows the LTE at an irregular interior point is
$O(h)$.
\section{Exercise 7.59}
We choose
\begin{align*}
  \psi_P := E_P + \max{\{\frac{T_1\phi_P}{C_1},\frac{T_2\phi_P}{C_2}\}}.
\end{align*}
Then $L_hE_P=-T_P$ and (7.86a),(7.86b) yield
\begin{align*}
  L_h\psi_P \le -T_P -\max{\{T_1,T_2\}} \le 0.
\end{align*}
Hence
\begin{align*}
  E_P &\le
  \max_{P\in\textbf{X}_{\Omega}}(E_P+\max{\{\frac{T_1\phi_P}{C_1},\frac{T_2\phi_P}{C_2}\}})\\
  &\le
    \max_{Q\in\textbf{X}_{\partial\Omega}}(E_Q+\max{\{\frac{T_1\phi_Q}{C_1},\frac{T_2\phi_Q}{C_2}\}})\\
  &=(\max_{Q\in\textbf{X}_{\partial\Omega}}\phi_Q)\max_{P\in\textbf{X}_{\Omega}}{\{\frac{T_1}{C_1},\frac{T_2}{C_2}\}},
\end{align*}
where the second step follows from Lemma 7.54. Repeat the above
arguments with $\psi_P := -E_P +
\max{\{\frac{T_1\phi_P}{C_1},\frac{T_2\phi_P}{C_2}\}}$ and we have
\begin{align*}
  -E_P \le (\max_{Q\in\textbf{X}_{\partial\Omega}}\phi_Q)\max_{P\in\textbf{X}_{\Omega}}{\{\frac{T_1}{C_1},\frac{T_2}{C_2}\}},
\end{align*}
which completes the proof.
\end{document}
